function loadGoogleControls() {
var feed  = 'http://motiongraphr.blogspot.com/feeds/posts/default?max-results=25';
var foptions = {
	linkTarget : google.feeds.LINK_TARGET_SELF,
	stacked : true,
	numResults : 25,
	horizontal : false,
	title : '25 Latest'	
};
new GFdynamicFeedControl(feed, 'feedControl', foptions);
document.getElementById('feedControl').style.width = '300px';

var noptions = {
	'queryList' : [{'title' : 'Design','q' : 'Design','ned' : 'ru_ru'},
		{'title' : 'Typography','q' : 'Typography','ned' : 'ru_ru'},
		{'title' : 'Creative','q' : 'Creative','ned' : 'ru_ru'},
		{'title' : 'Art','q' : 'Art','ned' : 'ru_ru'},
		{'title' : 'Graphics','q' : 'Graphics','ned' : 'ru_ru'},
		{'title' : 'Design','q' : 'Design','ned' : 'uk'},
		{'title' : 'Typography','q' : 'Typography','ned' : 'uk'},
		{'title' : 'Creative','q' : 'Creative','ned' : 'uk'},
		{'title' : 'Art','q' : 'Art','ned' : 'uk'},
		{'title' : 'Graphics','q' : 'Graphics','ned' : 'uk'}]
};
var newscontent = document.getElementById('newsresults');
var newsShow = new google.elements.NewsShow(newscontent, noptions);

var searchCtrl = new google.search.SearchControl();

var optsloc = new google.search.SearcherOptions();
var optsvideo = new google.search.SearcherOptions();
var optsimage = new google.search.SearcherOptions();
var optsweb = new google.search.SearcherOptions();
var optsblog = new google.search.SearcherOptions();
var optsbook = new google.search.SearcherOptions();
var optspatent = new google.search.SearcherOptions();
var localSearch = new google.search.LocalSearch();

optsloc.setExpandMode(google.search.SearchControl.EXPAND_MODE_CLOSED);
searchCtrl.addSearcher(localSearch, optsloc);
localSearch.setCenterPoint('Saint Petersburg');
localSearch.setAddressLookupMode(google.search.LocalSearch.ADDRESS_LOOKUP_DISABLED);

optsweb.setExpandMode(google.search.SearchControl.EXPAND_MODE_CLOSED);
searchCtrl.addSearcher(new google.search.WebSearch(), optsweb);

optsblog.setExpandMode(google.search.SearchControl.EXPAND_MODE_CLOSED);
searchCtrl.addSearcher(new google.search.BlogSearch(), optsblog);

optsvideo.setExpandMode(google.search.SearchControl.EXPAND_MODE_PARTIAL);
searchCtrl.addSearcher(new google.search.VideoSearch(), optsvideo);

optsimage.setExpandMode(google.search.SearchControl.EXPAND_MODE_PARTIAL);
searchCtrl.addSearcher(new google.search.ImageSearch(), optsimage);

optsbook.setExpandMode(google.search.SearchControl.EXPAND_MODE_CLOSED);
searchCtrl.addSearcher(new google.search.BookSearch(), optsbook);

optspatent.setExpandMode(google.search.SearchControl.EXPAND_MODE_CLOSED);
searchCtrl.addSearcher(new google.search.PatentSearch(), optspatent);

searchCtrl.draw(document.getElementById('searchcontrol'));
//searchCtrl.execute('type OR video');

var sitemapcontent = document.getElementById('sitemapSection');
var bloggerService = new google.gdata.blogger.BloggerService('com.appspot.interactivesampler');
var feedUri = 'http://www.blogger.com/feeds/4136241838537515650/posts/default?max-results=50';

var handleBlogPostFeed = function(postsFeedRoot) {
  var posts = postsFeedRoot.feed.getEntries();
  var html = '';
  html += '<dl>'
	   + '<dt><small>Source:&nbsp;&nbsp;</small>'
	   + '<a style="margin:10px;padding:10px;" href="'
	   + postsFeedRoot.feed.getLink('alternate').getHref()
	   + '">'
	   + '<img style="border:none;padding:0;" src=""/>'
	   + '&nbsp;'
	   + postsFeedRoot.feed.getTitle().getText()
	   + '</a><br/><br/></dt>';
  
  // Display blog posts
  html += '<dd><ul>';
  for (var i = 0, post; post = posts[i]; i++) {
	var postTitle = post.getTitle().getText();
	var postURL = post.getHtmlLink().getHref();
	html += '<li style="list-style-type:circle;"><a href="' + postURL + '" target="_blank">'
			  + postTitle
			  + '</a></li>';
  }
  html += '</ul></dd>';
  
  // Write out buffered HTML
  sitemapcontent.innerHTML = html;
};        
var handleError = function(error) {
  sitemapcontent.innerHTML = '<pre>' + error + '</pre>';
};        
bloggerService.getBlogPostFeed(feedUri, handleBlogPostFeed, handleError);

WebFont.load({google:{families:['Droid Serif']}});

//custom jquery
var $jam = jQuery.noConflict();
$jam(function() {
  $jam.getScript("http://motiongraphr-weblog.googlecode.com/svn/holder/jquery.cycle.all.2.72.js", function(){
    $jam('.rotarian').cycle({fx: 'fade', speed:500, random:1, pause:1, timeout:25000});
  });
});

} //setOnLoadCalback End

google.load("webfont", "1");
google.load("prototype", "1");
google.load("scriptaculous", "1");
google.load('jquery', '1');
google.load('jqueryui', '1');
google.load('gdata', '1.x', { packages : ['blogger'] });
google.load('search', '1', {'language' : 'en'});
google.load('feeds', '1');
google.load('elements', '1', {packages : ['newsshow']});

google.setOnLoadCallback(loadGoogleControls);